<%@ page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html ">
<html>
<head>
<meta charset="UTF-8">
<title>modify teacher page</title>
<style type="text/css">
td {
	text-align: center;
}

#tb1 {
	border: 1px;
	margin: 0;
	padding: 0;
	border-color: black;
	width: 100%;
	height: auto;
	border-style: solid;
}

#tb2 {
	margin: 0;
	padding: 0;
	width: 100%;
	height: auto;
}

a {
	text-decoration: none;
}
.tr1{
background-color: #cccccc;
}
.tr2{
background-color: #ccccff;
}
</style>
</head>
<body>
	<div align="center"
		style="border-style: solid; border-color: black; border-width: 2px; padding: 20px">
		<h1>教师信息编辑</h1>
		<a href="index.jsp"> 返回&raquo;</a>
		<hr>
		<form action="teacher_modify" method="post">
		<table id="tb1">
			<tr style="background-color: #ccccff">
				<td>序号</td>
				<td>工号</td>
				<td>姓名</td>
				<td>科目</td>
				<td>电话</td>
				<td colspan="2">选项</td>
			</tr>
			<c:forEach var="teacher" items="${sessionScope.Tlist}"
				varStatus="num">
				<c:if test="${num.count%2==1}" var="flag">
					<c:set var="temp" value="tr1" scope="page"></c:set>
				</c:if>
				<c:if test="${!flag}">
				<c:set var="temp" value="tr2" scope="page"></c:set>
				</c:if>
				<c:if test="${teacher.id!=sessionScope.TJNum}" var="ft">
					<tr class="${temp}">
						<td>${num.count}</td>
						<td>${teacher.id}</td>
						<td>${teacher.name}</td>
						<td>${teacher.lesson}</td>
						<td>${teacher.tel}</td>
						<td colspan="2"><a> <input type="button" value="删除" />
						</a></td>
					</tr>
				</c:if>
				<c:if test="${!ft}">
				<tr class="${temp}">
						<td>${num.count}</td>
						<td>${teacher.id}
						<input type="hidden" name="teacher.id" value="${teacher.id}">
						</td>
						<td><input type="text" name="teacher.name" value="${teacher.name}"/></td>
						<td><input type="text" name="teacher.lesson" value="${teacher.lesson}"/></td>
						<td><input type="text" name="teacher.tel" value="${teacher.tel}"/></td>
						<td><input type="submit" value="确认" /></td>
						<td><a href="teacher_remove?tempid=${teacher.id}"><input type="button" value="删除" />
						</a></td>
					</tr>
				</c:if>
			</c:forEach>
		</table>
		</form>
	</div>

</body>
</html>